home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / turbovis / hsys12.zip / HFTP.INT < prev    next >
Text File  |  1994-01-31  |  14KB  |  474 lines

  1. {************************************************************}
  2. {************************************************************}
  3. {**                                                        **}
  4. {**  Turbo Vision Demo                                     **}
  5. {**  Portions Copyright (c) 1992 by Borland International  **}
  6. {**  Portions Coypright (c) 1993 by KAP Holger Lembke      **}
  7. {**                                                        **}
  8. {************************************************************}
  9. {************************************************************}
  10.  
  11. {
  12. dt.
  13. KAP - Ergänzungen
  14. 22.12.93
  15.   ■ Seltener Fehler beim Zurücksteppen, wenn kein Link auf Seite
  16.       procedure MakeSelectVisible;
  17.       var D: TPoint;
  18.       begin
  19. **      if (selected=0) or (topic^.crossrefs=nil) then exit;
  20.  
  21.         if (locarray=nil) kap
  22.           then Topic^.GetCrossRef(Selected, KeyPoint, KeyLength, KeyRef)
  23. 18.09.93
  24.   ■ SELECTED im TStackRec (von Byte) auf Word geändert
  25.   ■ MAKEFOCUSVISIBLE Bereichsüberschreitung beim Suchen des Hotkeys
  26.     (while (p<>nil) !!and (count<=topic^.numrefs)!! do begin
  27. 16.09.93
  28.   ■ LASTPARAGRAPH:=NIL; in constructor THelpTopic.Load (Quelle: H.C.F.)
  29.     (Komisch, daß das nicht schon früher gestört hat....)
  30. 19.08.93
  31.   ■ Kontrolle der Streamregistrierung eingebaut. Wenn Hilfsstreams nicht
  32.     registriert, dann reagieren wichtige Objekte im Constructor mit FAIL.
  33. 10.08.93
  34.   ■ Kontrolle der Änderungen vom 8.-9.8.
  35.   ■ Topic link-Jumping eingebaut (MakefocusVisible)
  36. 09.08.93
  37.   ■ Markierung von Schaltflächen dramatisch beschleunigt (Handleevent)
  38.     (alles im Zuge des Deppen-Aufräumens)
  39. 08.08.93
  40.   ■ DRAW-Methode bei vielen Links dramatisch beschleunigt
  41.     (vorher muss ein Depp drangewesen sein...)
  42. 04.08.93
  43.   ■ compressor/decompressor optimiert
  44. 01.08.93
  45.   ■ compressor/decompressor
  46. 22.07.93
  47.   ■ modales Fenster ergänzt um "resizable dialog"
  48. 11.07.93
  49.   ■ Fehler in der thelpviewer.draw methode, wenn farbumschaltung
  50.     ausserhalb des sichtbereiches liegt. es wurde dann übersehen.
  51.     Folge: text war falsch befarbt...
  52.  
  53. 03.07.93
  54.   ■ Speichern der letzten Menüposition umgestellt
  55.  
  56. 02.06.93
  57.   ■ Verändertes Mono-Handling
  58.  
  59. 19.05.93
  60.   ■ Bugfix: Topic-Markierung und Farben in einer Zeile
  61.     Bugfix: Farbmarkierungen und horizontales Scrollen
  62.  
  63. 11.05.93
  64.   ■ Bugfix: thelpviewer.draw und mehrzeiliger Umbruch farbiger texte
  65.  
  66. 25.04.93
  67.   ■ Optimisierung bei "countcs" in THelpTopic.WrapText
  68.     (Die Darstellung bei vielen Topics ist immer noch recht träge.)
  69.  
  70. 21.04.93
  71.   ■ Bugfix: Zeilenumbruch bei langen Paragraphen
  72.  
  73. 20.04.93
  74.   ■ nicht-modale Hilfe merkt sich die Größe
  75.   ■ geänderte Farbe auch über Zeilenumbrüche hinweg
  76.  
  77. 19.04.93
  78.   ■ Umbau der THelpViewer.Draw-Methode
  79.     (incl. Änderungen in THelpTopic.WrapText)
  80.     - lock/unlock zur Darstellungsberuhigung
  81.     - zeichenweises Ablegen wg. Farbänderungen
  82.       methode: #n als Code, es ändert sich =nur= der Vordergrund
  83.                ## für #
  84.                #! für Rücksetzen auf Dialogfarbe
  85.  
  86. 16.04.93
  87.   ■ Alt-F1 focusiert letztes focusiertes topic
  88.  
  89. 15.04.93
  90.   ■ modales Fenster wird in anderem Farbset dargestellt als nicht-modales
  91.   ■ Alt-F1 für Help-History
  92.   ■ Shift-F1 für Hilfe über Hilfe
  93.  
  94. 14.04.93
  95.   ■ Unterscheidung zwischen modaler und nicht-modaler Hilfe
  96.  
  97.  
  98. eng.
  99. 22.12.93
  100.   ■ rare error with "last help", if last page has no link
  101.       procedure MakeSelectVisible;
  102.       var D: TPoint;
  103.       begin
  104. **      if (selected=0) or (topic^.crossrefs=nil) then exit;
  105.  
  106.         if (locarray=nil) kap
  107.           then Topic^.GetCrossRef(Selected, KeyPoint, KeyLength, KeyRef)
  108.  
  109. 18.09.93
  110.   ■ SELECTED at TStackRec (from Byte) changed to Word
  111.   ■ MAKEFOCUSVISIBLE range-error when searching the hotkey
  112.     (while (p<>nil) !!and (count<=topic^.numrefs)!! do begin
  113. 16.09.93
  114.   ■ LASTPARAGRAPH:=NIL; at constructor THelpTopic.Load (Quelle: H.C.F.)
  115.     (funny, that this hadn't disturbed earlyer....)
  116. 19.08.93
  117.   ■ check of stream-registration inserted. if stream is not registered,
  118.     importend constructors will FAIL.
  119. 10.08.93
  120.   ■ check of changes from 8.-9.8.
  121.   ■ Topic link-Jumping einserted (MakefocusVisible)
  122. 09.08.93
  123.   ■ dramaticly increase of link-selection (Handleevent)
  124.     (again: tiding up after the fool)
  125. 08.08.93
  126.   ■ DRAW-methode inceased when lot of links are shown
  127.     (must been programed by a fool.....)
  128. 04.08.93
  129.   ■ compressor/decompressor optimized
  130. 01.08.93
  131.   ■ compressor/decompressor
  132. 22.07.93
  133.   ■ added "resizable dialog" to modalar view
  134. 11.07.93
  135.   ■ fixed error inside thelpviewer.draw methode, if colorchange is outside
  136.     the visible range, it was missed then.
  137.     result: text has wrong color...
  138.  
  139. 03.07.93
  140.   ■ change: storing the last menueposition
  141.  
  142. 02.06.93
  143.   ■ change: mono-handling
  144.  
  145. 19.05.93
  146.   ■ Bugfix: link-color and color of a line of text
  147.     Bugfix: color and horizontal scrolling
  148.  
  149. 11.05.93
  150.   ■ Bugfix: thelpviewer.draw and wrap with more lines
  151.  
  152. 25.04.93
  153.   ■ optimization: at "countcs" in THelpTopic.WrapText
  154.     (displaying lot of links is ugly slow.)
  155.  
  156. 21.04.93
  157.   ■ Bugfix: linewrap with long paragraphs
  158.  
  159. 20.04.93
  160.   ■ non-modal helpview will store its size
  161.   ■ changed color with wrapped lines
  162.  
  163. 19.04.93
  164.   ■ redesign of THelpViewer.Draw-methode
  165.     (incl. changes in THelpTopic.WrapText)
  166.     - lock/unlock
  167.     - changed to piut-by-char because coloring
  168.       methode: #n for colorcode, only foreground!
  169.                ## für #
  170.                #! für reset to "standardcolor"
  171.  
  172. 16.04.93
  173.   ■ Alt-F1 for switching back to last topic
  174.  
  175. 15.04.93
  176.   ■ modale view gets a different color set than non-modal view
  177.   ■ Alt-F1 for help-history
  178.   ■ Shift-F1 for help about help
  179.  
  180. 14.04.93
  181.   ■ nodal view <-> non-modal view
  182. }
  183.  
  184.  
  185. {$A+,B-,D-,E-,F-,G-,I-,L-,N-,O-,P-,Q-,R-,S-,T-,V-,X+,Y-}
  186.  
  187. {$Q-,I-,O- }
  188.  
  189. unit HelpFile;
  190.  
  191. interface
  192.  
  193. uses Objects, Drivers, Views;
  194.  
  195. const
  196.   CHelpColor      = {8} #$37#$3F#$3A#$13#$13#$30#$3E#$1E;
  197.   CHelpBlackWhite = {8} #$07#$0F#$07#$70#$70#$07#$0F#$70;
  198.   CHelpMonochrome = {8} #$07#$0F#$07#$70#$70#$07#$0F#$70;
  199.   CHelpViewer     = {3} #6#7#8;
  200.   Chelpwindow     = {8} #16#17#18#19#20#57#21#13;
  201.   Cdialogwindow   = {8} #32#33#34#35#36#38#40#13; { die farbe der dialoge }
  202.  
  203. {KAP}
  204.   {
  205.   chelpwindow-felder
  206.    1 ????
  207.    2 rahmen
  208.    3 rahmensymbole [■]
  209.    4 scroller
  210.    5 background, scrollersymbole
  211.    6 textinhalt
  212.    7 nicht focusierter topic
  213.    8 linked topics/reaktionstopic für ENTER
  214.   }
  215.  
  216. (*
  217.   CHelpWindow     = #128#129#130#131#132#133#134#135;
  218. *)
  219.  
  220. {KAP}
  221.   maxhelpback           = 50;
  222.  
  223.   indexpagenumber       : word = 100;
  224.   helpabouthelp         : word = 99;
  225.  
  226.   cmhelplast            = 65001;
  227.   cmhelpindex           = 65002;
  228.  
  229.   lastpos               : trect = (a:(x:-1;y:0);b:(x:50;y:18));
  230.  
  231.   MagicHeader           = $46484246; {'FBHF'}
  232.  
  233. { wenn auch tp60-hf geöffnet werden können sollen ... }
  234. { if it should be possible to old tp60-hf }
  235.   openanyway            : boolean = false;
  236.  
  237. { erlaubt den Hilfsfenster (trotz Dialog-Aussehen) die Größe zu ändern }
  238. { a non-modal help will be resizable, if set to true }
  239.   resizeabledialog      : boolean = false;
  240.  
  241.   ct_store              = $01;
  242.   ct_nibble             = $02;
  243.   ct_lastnibble         = $03;
  244.  
  245.   nc_rawchar            = $0f;
  246.   nc_repchar            = $0e;
  247.  
  248.   comparraysize         = 13;
  249.  
  250.   createcompressedhelp  : boolean = false;
  251.  
  252.   helpversion           = $20;  { helpfile - version 2.0 }
  253.  
  254. Type string80 = string[80];
  255.  
  256. Const
  257.  
  258.   helpdialogtitle       : string80 = 'Help-Dialog';
  259.   helpwindowtitle       : string80 = 'Help';
  260.   nohelpInvalidStr      : string80 = #13' No help for this topic link.';
  261.   emptyhelpInvalidStr   : string80 = #13' This helppage is empty.';
  262.  
  263.  
  264. type
  265.       pbytearray = ^tbytearray;
  266.       tbytearray = array[0..63*1024] of byte;
  267.  
  268.       pchararray = ^tchararray;
  269.       tchararray = array[0..63*1024] of char;
  270.  
  271. { TParagraph }
  272.  
  273.   PPParagraph = ^pparagraph;
  274.   PParagraph = ^TParagraph;
  275.   TParagraph = record
  276.     Next: PParagraph;
  277.     Wrap: Boolean;
  278.     Size: Word;
  279.     Text: record end;
  280.   end;
  281.  
  282. { THelpTopic }
  283.  
  284.   TCrossRef = r